package com.yq.dayin;


import netscape.security.PrivilegeTable;

/**
 * @author 3307235355@qq.com
 * @description
 * @since 2022/07/04 21:21
 */
public class Test2 {
    private static  int index =1;
    static Object object = new Object();
    public static void main(String[] args) {

        new Thread(new Runnable() {
            @Override
            public void run() {
                synchronized (object){
                    if (index%3==0){
                        for (int i = 1; i <=52; i++) {
                            System.out.println(i);
                        }
                    }
                }


            }
        }).start();

        new Thread(new Runnable() {
            @Override
            public void run() {

                synchronized (object){
                    if (index%3==0){
                        String s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
                        char[] chars = s.toCharArray();
                        for (int i = 0; i <= chars.length; i++) {
                            System.out.println(chars[i]);
                        }
                    }

                }



            }
        }).start();
    }


}
